const express = require('express')
const cors = require('cors')
const bodyParser = require('body-parser')

const app = express()

app.use(cors())
app.use(bodyParser.urlencoded({extended:true}))

app.get('/',(req,res) => {
    res.send('你好')
})
app.post('/post',(req,res) => {
    res.send(req.body)
})


app.listen(8080,() => {
    console.log('server running at http://127.0.0.1:8080');
})